<ion-view view-title="优惠券"  hide-tabs="true"id="my_coupon">
  <!-- 头部 -->
  <ion-header-bar align-title="center" class="bar-positive">
    <div class="buttons">
      <button class="button-go-back" ng-click="goback()"><i class="icon ion-chevron-left"></i></button>
    </div>
    <h1 class="title">我的优惠券</h1>
  </ion-header-bar> 
  <div class="bar bar-subheader row coupon_tabs" style="padding:0;">
    <div ng-class={'col-50':true,'select':select} ng-click="tabs(0)">未使用</div>
    <div ng-class={'col-50':true,'select':unselect} ng-click="tabs(1)">历史券</div>
  </div>
  <ion-content [scroll="true"] [overflow-scroll="true"]  class="has-subheader " style="padding:10px 15px;">
     <ul>
        <li ng-repeat="item in un_use" ng-show="select">
          <img ng-src="img/yhbg.jpg" alt="优惠券背景">
          <div class="info">
            <img ng-src="{{item.imageUrl}}" alt="优惠券logo" style="z-index:1000;"> 
            <p>
              <!-- 全场任意消费可用 -->
             
              {{item.couponTypeName}}
            </p>
            <h4>
              {{item.couponName}}
              <!-- 100元代金券 -->
            </h4>
            <p class="bottom">
              <span class="time">有效日期至
                {{item.endTime | shijian}}
              </span>
              <span class="right " ng-click = "go_details(item.couponType,item.id)">详情</span>
            </p>
          </div>
        </li>
        <li class="c_list" ng-repeat="x in used" ng-show="unselect">
          <img ng-src="{{x.imageUrl}}" alt="优惠券logo" class="logo" style="z-index:1000;"> 
          <p>
             {{x.couponInfo}}
            <!-- 全场任意消费可用 -->
          </p>
          <h4>{{x.couponName}}</h4>
          <div class="status">
            <img ng-src="img/icons/ygq.png" alt="已过期" ng-show="x.isover" >
            <img ng-src="img/icons/ysy.png" alt="已使用" ng-show="x.isused">
          </div>
          <p class="bottom">
            <span class="time">有效日期至{{x.endTime | shijian}}</span>
            <span class="right pay"  ng-click = "go_details(x.couponType,x.id)">详情</span>
          </p>
        </li>
    </ul>
  <ion-infinite-scroll ng-if="moredata" on-infinite="loadMore()" immediate-check="false"
                        distance="10%"></ion-infinite-scroll>
   </ion-content>
  <!-- <ion-tabs class="tabs-positive tabs-striped tabs-top">  
      <ion-tab title="未使用" >  
          <ion-view style="background:#fff;">  
              <ion-content id="new_coupon">  
              <ion-refresher  pulling-text="下拉刷新..."  on-refresh="doRefresh()">  </ion-refresher> 
              <ul>
                  <li>
                    <img ng-src="img/yhbg.jpg" alt="优惠券背景">
                    <div class="info">
                      <img ng-src="img/pinpai.png" alt="优惠券logo"> 
                      <p>全场任意消费可用</p>
                      <h4>100元代金券</h4>
                      <p class="bottom">
                        <span class="time">有效日期至2018.12.31</span>
                        <span class="right ">详情</span>
                      </p>
                    </div>
                  </li>
                  <li>
                    <img ng-src="img/yhbg.jpg" alt="优惠券背景">
                    <div class="info">
                      <img ng-src="img/pinpai.png" alt="优惠券logo"> 
                      <p>全场任意消费可用</p>
                      <h4>100元代金券</h4>
                      <p class="bottom">
                        <span class="time">有效日期至2018.12.31</span>
                        <span class="right">详情</span>
                      </p>
                    </div>
                  </li>
                  <li>
                    <img ng-src="img/yhbg.jpg" alt="优惠券背景">
                    <div class="info">
                      <img ng-src="img/pinpai.png" alt="优惠券logo"> 
                      <p>全场任意消费可用</p>
                      <h4>100元代金券</h4>
                      <p class="bottom">
                        <span class="time">有效日期至2018.12.31</span>
                        <span class="right">详情</span>
                      </p>
                    </div>
                  </li>
              </ul>
              <ion-infinite-scroll  ng-if="moreDataCanBeLoaded()"  icon="ion-loading-c"  on-infinite="loadMoreData()">  </ion-infinite-scroll> 
              </ion-content>  
          </ion-view>  
      </ion-tab>  
      <ion-tab title="历史券">  
          <ion-view style="background:#fff;">  
              <ion-content id="History_coupon">
              <ion-refresher  pulling-text="下拉刷新..."  on-refresh="doRefresh_gift()">  </ion-refresher> 
              <ul>
                <li class="c_list">
                  <img ng-src="img/pinpai.png" alt="优惠券logo" class="logo"> 
                  <p>全场任意消费可用</p>
                  <h4>100元代金券</h4>
                  <div class="status">
                    <img ng-src="img/icons/ygq.png" alt="已过期" ng-show="true">
                    <img ng-src="img/icons/ysy.png" alt="已使用" ng-show="false">
                  </div>
                  <p class="bottom">
                    <span class="time">有效日期至2018.12.31</span>
                    <span class="right pay">详情</span>
                  </p>
                </li>
                <li class="c_list">
                  <img ng-src="img/pinpai.png" alt="优惠券logo" class="logo"> 
                  <p>全场任意消费可用</p>
                  <h4>100元代金券</h4>
                  <div class="status">
                    <img ng-src="img/icons/ygq.png" alt="已过期" ng-show="false">
                    <img ng-src="img/icons/ysy.png" alt="已使用" ng-show="true">
                  </div>
                  <p class="bottom">
                    <span class="time">有效日期至2018.12.31</span>
                    <span class="right pay">详情</span>
                  </p>
                </li>
                <li class="c_list">
                  <img ng-src="img/pinpai.png" alt="优惠券logo" class="logo"> 
                  <p>全场任意消费可用</p>
                  <h4>100元代金券</h4>
                  <div class="status">
                    <img ng-src="img/icons/ygq.png" alt="已过期" ng-show="true">
                    <img ng-src="img/icons/ysy.png" alt="已使用" ng-show="false">
                  </div>
                  <p class="bottom">
                    <span class="time">有效日期至2018.12.31</span>
                    <span class="right pay">详情</span>
                  </p>
                </li>
              </ul>
              <ion-infinite-scroll  ng-if="moreDataCanBeLoaded_gift"  icon="ion-loading-c"  on-infinite="loadMoreData_gift()">  </ion-infinite-scroll> 
              </ion-content>
          </ion-view>  
      </ion-tab>  
  </ion-tabs>   -->
</ion-view>